﻿using System;

namespace SanjaySingh.DefaultBrowserPackage
{
    public enum UiCommand : uint
    {
        None = 0,
        cmdidChangeToIE = 0x0100,
        cmdidChangeToChrome = 0x0101,
        cmdidChangeToFirefox = 0x0102,
        cmdidChangeToSafari = 0x0103
    }

    public static class BrowserExtensions
    {
        public static UiCommand GetUiCommand(this Browser browser)
        {
            UiCommand browserCommand = UiCommand.None;
            if (browser.IsChrome)
                browserCommand = UiCommand.cmdidChangeToChrome;
            else if (browser.IsFirefox)
                browserCommand = UiCommand.cmdidChangeToFirefox;
            else if (browser.IsInternetExplorer)
                browserCommand = UiCommand.cmdidChangeToIE;
            else if (browser.IsSafari)
                browserCommand = UiCommand.cmdidChangeToSafari;
            return browserCommand;
        }

    }
}